package com.chenjt.one_base;

import com.chenjt.three_tools.ModelUtil;
import dev.langchain4j.data.image.Image;
import dev.langchain4j.model.openai.OpenAiImageModel;
import dev.langchain4j.model.output.Response;

/**
 * 注释：文生图
 *
 * @author chenjt
 * @date 2025/3/6 16:01
 */
public class ImageDemo {


    public static void main(String[] args) {
        OpenAiImageModel model = OpenAiImageModel.builder()
                .baseUrl(ModelUtil.BASE_URL)
                .apiKey(ModelUtil.API_KEY)
                .build();

        Response<Image> response = model.generate("赛博朋克风格的汽车");
        System.out.println(response.content().url());


    }

}
